#pragma once
#include "Pch.h"
#include "Memobj.h"

namespace GBase
{
	void* MemObj::operator new(size_t count, const char* file , int line , const char* func )
	{
		//std::cout << "void* MemObj::operator new(size_t count, const char* file , int line , const char* func )" <<std::endl;
		return AllocManager<>::allocateBytes(count, file, line, func);
	}

	void* MemObj::operator new(size_t count)
	{
		//std::cout << "void* MemObj::operator new(size_t count)" <<std::endl;
		return AllocManager<>::allocateBytes(count);
	}

	void* MemObj::operator new[](size_t count, const char* file , int line , const char* func )
	{
		return AllocManager<>::allocateBytes(count, file, line, func);
	}

	void* MemObj::operator new[](size_t count)
	{
		//std::cout << "void* MemObj::operator new[](size_t count)" <<std::endl;
		return AllocManager<>::allocateBytes(count);
	}

	void MemObj::operator delete(void *ptr)
	{
		//std::cout << "void MemObj::operator delete(void *ptr)" <<std::endl;
		return AllocManager<>::deallocateBytes(ptr);
	}

	void MemObj::operator delete[](void *ptr)
	{
		//std::cout << "void MemObj::operator delete[](void *ptr)" <<std::endl;
		return AllocManager<>::deallocateBytes(ptr);
	}

}

